home *** CD-ROM | disk | FTP | other *** search
/ Animedia 38 / Animediacd38.iso / Extra / winamp511.exe / $R0 / Winamp Modern / scripts / mlmenu.m < prev    next >
Text File  |  2005-09-15  |  1KB  |  46 lines

  1. #include <lib/std.mi>
  2. #include "attribs.m"
  3.  
  4. System.onScriptLoaded() {
  5.     initAttribs();
  6.     menubar_ml_attrib.onDataChanged();
  7. }
  8.  
  9. menubar_ml_attrib.onDataChanged() {
  10.  
  11.     Group Player = getscriptgroup().findobject("player.content.ml.dummy.group");
  12.     Group MenuBar = getscriptgroup().findobject("wasabi.menubar.ml");
  13.     Layout main = getscriptgroup().getParentLayout();
  14.  
  15.     main.beforeRedock();
  16.     if (getData() == "1") {
  17.         Player.setXmlParam("y","17");
  18.         MenuBar.show();
  19.         main.snapAdjust(0,0,0,0);
  20.     } else {
  21.         Player.setXmlParam("y","0");
  22.         MenuBar.hide();
  23.         main.snapAdjust(0,0,0,17);
  24.     }
  25.     main.Redock();
  26. }
  27.  
  28. System.onKeyDown(String k) {
  29.   if (menubar_ml_attrib.getData() == "0") return;
  30.   Layout l = getScriptGroup().getParentLayout();
  31.   if (!l.isActive()) return;
  32.   if (k == "alt+f") {
  33.     getScriptGroup().findObject("mlFile.menu").sendAction("open", "", 0, 0, 0, 0);
  34.     complete;
  35.   }
  36.   if (k == "alt+i") {
  37.     getScriptGroup().findObject("mlView.menu").sendAction("open", "", 0, 0, 0, 0);
  38.     complete;
  39.   }
  40.   if (k == "alt+h") {
  41.     getScriptGroup().findObject("mlHelp.menu").sendAction("open", "", 0, 0, 0, 0);
  42.     complete;
  43.   }
  44. }
  45.  
  46.